body {
    background-image: url(../img/whitey.png);
    overflow: hidden;
    margin: 0;
    padding: 0;
}

* {
    -webkit-user-select: none;
   user-select: none;    
}
#main {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clear: both;
}
.bookcases_wrap {
    width: 100%;
    overflow: hidden;
    height: 100%;
}

.bookcases {
    width: 2000px;
    -webkit-transition: left 0.8s;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
}

.bookcase_back {
    background: -webkit-linear-gradient(left, #E6E6E6 0px, #E0E0E0 20px, #EEE 20px, #EEE 760px, #E0E0E0 760px, #E6E6E6 780px);
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    height: 100%;
    overflow: hidden;
    padding-top: 30px;
}

.bookcase {
    width: 780px;
    float: left;
    /* min-height: 500px; */
    /*margin: 100px;*/
    height: 100%;
    padding: 0 15px;
    background: #F6F6F6;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.bookshells {
    height: 100%;
    -webkit-transition: margin-top 0.5s;
}

.bookcase .header {
    text-align: center;
    /*
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    background: #FFF;
    background: -webkit-linear-gradient(#FFF, #F6F6F6);
    */
    height: 0px;
    top: 0;
}

.bookcase .header .title {
    display: inline;
    padding: 6px 15px 8px;
    border: 1px solid #ccc;
    box-shadow: 1px 1px 3px #888;
    background: #FFF;
    font-size: 24px;
    border-radius: 0 0 5px 5px;
    z-index: 10000;
    font-family: Helvetica;
    position: relative;
    top: 6px;
}

.bookshell {
    padding: 20px 5px 0px;
    height: 177px;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
}

.bookshell.hide {
    overflow: hidden;
    margin-top: -197px;
}

.books {
    height: 150px;
    border-bottom: 8px solid #B0B0B0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    /*padding: 20px 10px 0;*/
}

.plank {
    height: 10px;
    background: #F9F9F9;
    border: 1px solid #ccc;
}

.nav {
    font-size: 100px;
    font-family: Arial;
    color: #FFF;
    font-weight: bold;
    width: 40px;
    height: 400px;
    position: absolute;
    cursor: pointer;
    padding: 0 25px;
    line-height: 400px;
    background: #000;
    opacity: 0.1;
    -webkit-transition: opacity 0.5s;
    z-index: 2000;
    top: 0;
}

.nav:hover {
    opacity: 0.3;
}

.nav.left {
    border-radius: 0 20px 20px 0;
    left: 0;
    opacity: 0;
}

.nav.right {
    border-radius: 20px 0 0 20px;
    right: 0;
}

#books_select_wrap {
    position: absolute;
    bottom:0;
    width: 100%;
    z-index: 3000;
    -webkit-transition: left 0.5s;
    left: -3000px;
}
#books_select {
    height: 150px;
    background: #FFF;
    border-bottom: 1px solid #CCC;
    box-shadow: 0px 1px 3px #888;
    padding: 10px;
    float: left;
}

#books_select_show {
    width: 150px;
    height: 30px;
    padding: 10px;
    text-align: center;
    font-size: 20px;
    background: #FFF;
    border: 1px solid #CCC;
    border-radius: 0 0 10px 10px;
    -webkit-transform: rotate(-90deg);
    -webkit-transform-origin: 86px 86px;
    cursor: pointer;
    float: left;
}

#books_select_show_wrap {
    float: left;
    width: 0;
}

.book {
    padding-right: 40px;
    width: 100px;
    height: 150px;
    cursor: move;
}
#books_select .book {
    float: left;
}

#books_select .book:hover .book_wrap {
   box-shadow: 1px 1px 3px #AAA; 
}

.bookshell .book {
    padding-right: 30px;
    width: 100px;
    height: 150px;
    float: left;
}

#book_viewer {
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    width: 100%;
    height: 100%;
    z-index: 20000;
}

#book_viewer_back {
    position: absolute;
    background: #000;
    opacity: 0.01;
    transition: all 0.5s;
    -webkit-transition: all 0.5s;
    width: 100%;
    height: 100%;
}

#book_viewer_back_page {
    width: 200px;
    left: 0px;
    top: 100px;
    position: absolute;
    background: -webkit-linear-gradient(right, #EEEEEE 0px, #FBFBFB 25px, #EEE 50px, #FFF 200px);
}

#book_viewer_pages {
    width: 800px;
    left: 200px;
    top: 100px;
    position: absolute;
    background: -webkit-linear-gradient(left, #C6C6C6 0px, #E1E1E1 10px, #FFF 50px);
}

#book_viewer_canvas {
    position: absolute;
    top: 0px;
    left: 0;
    z-index: 2000;
}

#book_viewer_pages section {
    background: -webkit-linear-gradient(left, #C6C6C6 0px, #E1E1E1 10px, #FFF 50px);
    width: 800px;
    position: absolute;
    height: 100%;
    overflow: hidden;
}

#book_viewer_pages .page {
    overflow-x: hidden;
    overflow-y: auto;
    height: 100%;
    width: 100%;
}

#book_viewer_pages .page_number {
    margin-top: -50px;
    float: right;
    margin-right: 50px;
    color: #666;
    font-weight: bold;
}

#book_viewer_pages .page > div {
    width: 700px;
    padding: 10px 40px 10px 60px;
}

#book_viewer_page_number {
    position: absolute;
    left: 950px;
    z-index: 1000;
}

.book {
    -webkit-perspective: 1000;
}

.book .book_wrap {
    -webkit-transform-style: preserve-3d;
    border: 1px solid #CCC;
    -webkit-transition: all 1s;
    width: 100%;
    height: 100%;
}

.bookshell .book .book_wrap {
    -webkit-transform-origin: 120px 0;
    -webkit-transform: rotateY(30deg);
}

.bookshell .book:hover .book_wrap {
    -webkit-transform: rotateY(0deg);
}

.book .book_wrap:before {
    -webkit-transition: all 1s;
    width: 140px;
    height: 20px;
    position: absolute;
    content: attr(title);
    -webkit-transform-origin: 0 0;
    -webkit-transform: translate3d(0, 151px, -21px) rotate(-90deg) rotateX(85deg);
    z-index: 200;
    font-family: Impact;
    font-size: 12px;
    border: 1px solid #999;
    background: #FAFAFA;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    padding: 0 5px;
    color: #333;
}

.book:hover .book_wrap:before {
    -webkit-transition: all 1s;
    /*-webkit-transform: rotate(-90deg) translate(-65px, -85px) rotateX(0deg);*/
}

.book .cover {
    position: relative;
    top:0;
    height: 100%;
    width: 100%;
    background: #FAFAFA;
    background-position: center;
    background-size: cover;
    z-index: 100;
}

#drag_container .cover {
    width: 100px;
    height: 140px;
    margin-top: -70px;
    margin-left: -50px;
    opacity: 0.4;
    background-position: center;
    background-size: cover;
    cursor: move;
}

.book .delete {
  position: relative;
  top: -1;
  float: right;
  height: 10px;
  width: 12px;
  padding: 6px 4px;
  background: #FFF;
  right: 5px;
  transition: all 0.3s;
  -webkit-transition: all 0.3s;
  box-shadow: 1px 1px 3px #AAA;
  border: 1px solid #CCC;
  cursor: pointer;
  font-family: Impact;
  font-size: 20px;
  line-height: 12px;
}

.bookshell .book:hover .delete {
  right: -20px;
}
.bookshell .book {
/*
  -webkit-transition-property: -webkit-transform, top;
  -webkit-transition-duration: 0.2s, 0.3s;
  -webkit-transition-timing-function: ease-out, ease-in;
  -webkit-transition-delay: 0, 0.2s;
*/
/*
  -webkit-transition-timing-function: cubic-bezier(0,-0.3,1,0), cubic-bezier(0,-0.3,1,0), ease-out;
  -webkit-transition-duration: 0.4s, 0.4s, 0.3s;
  -webkit-transition-property: bottom, right, width;
  -webkit-transition-delay: 0, 0, 0.4s;
*/
}

.bookshell .book[deleted] {
    -webkit-transition-timing-function: cubic-bezier(0,0.1,0.9,1), cubic-bezier(0,-0.1,0.5,0), cubic-bezier(0,0.1,0.9,1);
    -webkit-transition-duration: 0.5s;
    -webkit-transition-property: left, top, opacity;
    position: absolute;
    z-index: 1000;
}

#trash_bin_wrap {
  position: absolute;
  z-index: 2000;
  bottom: 200px;
  width: 100%;
  right: 0;
  height: 0;
}

#trash_bin {
    width: 180px;
    height: 180px;
    position: absolute;
    right: 0;  
    background-image: url(../img/bookshell/bin_empty.png);
    background-size: contain;
    cursor: pointer;
    z-index: 2100;
    -webkit-transition: all 0.5s;
}

#trash_bin_wrap[bounce] #trash_bin {
    -webkit-animation: bin-bounce 0.5s ease-in-out;
}

/*
#trash_bin_wrap[opened] {
    width: 100%;
}
*/

#trash_bin_wrap[opened] #trash_bin {
    right: -60px;
}

#trash_bin_books_table {
    display: table;
    position: absolute;
    right: 0;
    width: 0px;
    z-index: 2050;
    overflow: hidden;
    -webkit-transition: all 0.5s;
}

#trash_bin_wrap[opened] #trash_bin_books_table {
   width: 90%;
}

#trash_bin_books {
    display: table-row;
}

.trash_bin_books_cell {
    display: table-cell;
}

@-webkit-keyframes 'bin-bounce' {
    from {
	bottom:20px;
    }
    25% {
	bottom:40px;
    }
    55% {
	bottom:20px;
    }
    75% {
	bottom:30px;
    }
    to {
	bottom:20px;
    }	
}

.bookcase_nav {
    float: right;
    height: 100%;
}

.bookcase_nav .nav_up, .bookcase_nav .nav_down, .bookcase_nav .add_button {
    opacity: 0;
    visibility: hidden;
    background: #000;
    color: #FFF;
    width: 20px;
    height: 40px;
    position: absolute;
    margin-left: 15px;
    padding: 5px 15px;
    font-size: 30px;
    font-family: Impact;
    font-weight: bold;
    cursor: pointer;
    -webkit-transition: opacity 0.3s;
}

.bookcase_nav .add_button {
    height: 100px;
    padding: 35px 15px;
}

.bookcase_nav .nav_up, .bookcase_nav .add_button {
    border-radius: 0 0 10px 0;
    top: 0;
}

.bookcase_nav .nav_down {
    border-radius: 0 10px 0 0;
    bottom: 0;
}

#drag_container {
    position: absolute;
    z-index: 5000;
    cursor: move;
}

.book_preview {
    display: none;
    width: 100px;
    height: 150px;
    float: left;
    opacity: 0.6;
    padding-right: 30px;
}

.book_preview_back {
    background: #FFF;
    width: 100px;
    height: 150px;
}